package org.leaf.green.b2b

class RetailerService {

    static transactional = true

    def inventories(retailerId) {
        def inventories = RetailerInventory.withCriteria{
            //join "retailer"
            eq("retailer.id", retailerId)
            order("date", "desc")
            maxResults(10)
        }
        log.info("inventories=${inventories}")
        return inventories
    }
}
